package org.stayfool.client.event;

import io.netty.handler.codec.mqtt.MqttMessage;

/**
 * Created by stayfool on 2017/2/16.
 */
public class MqttEvent {

    private final EventKey key;
    private final MqttMessage message;

    public MqttEvent(EventKey key, MqttMessage message) {
        this.key = key;
        this.message = message;
    }

    /**
     * get event key
     *
     * @return {@link EventKey}
     */
    public EventKey getKey() {
        return key;
    }

    /**
     * get event message
     *
     * @return {@link MqttMessage}
     */
    public MqttMessage getMessage() {
        return message;
    }
}
